package com.sdruixinggroup.mondayb2b.ui;

import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.support.annotation.Nullable;
import android.support.v7.widget.ButtonBarLayout;
import android.support.v7.widget.LinearLayoutCompat;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.sdruixinggroup.mondayb2b.R;

/**
 * Created by tangjie on 2017/11/8.
 */

public class RegisterActivity extends  BaseActivity implements View.OnClickListener{
    private Button btn_register;
    private TextView register_detail;
    private LinearLayout register_all;
    private int code=0;



    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register);
        initView();
        registerListenr();
        dealcode();

    }

    /**
     * 绑定监听
     */
    private void registerListenr() {

        btn_register.setOnClickListener(this);
        register_detail.setOnClickListener(this);

    }

    /**
     * 处理code 0：注册界面 1：忘记密码界面
     */
    private void dealcode() {
        code=getIntent().getIntExtra("code",0);
        if (code==1){
            register_all.setVisibility(View.GONE);
            btn_register.setText("确定");
        }

    }

    private void initView() {
        btn_register= (Button) findViewById(R.id.btn_register);
        register_all= (LinearLayout) findViewById(R.id.register_all_msg);
        register_detail= (TextView) findViewById(R.id.register_detail);
    }

    @Override
    public void onClick(View view) {
        if (view==btn_register){

        }
        if (view==register_detail){
            startActivity(new Intent(this,RegisterDetailActivity.class));
        }
    }
}
